package com.sheyu.mall.product.entity.spu;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;

import com.sheyu.common.commonEntity.DeletedEntity;
import com.sheyu.mall.product.valid.ListValue;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * spu信息
 *
 * @author sheyu
 * @email sheyu@XXX.com
 * @date 2020-07-27 12:44:31
 */
@Data
@TableName("pms_spu_info")
public class SpuInfoEntity extends DeletedEntity {

	/**
	 * 商品id
	 */
	@TableId
	private Long id;
	/**
	 * 商品名称
	 */
	@NotBlank(message = "spu名称不能为空")
	private String spuName;
	/**
	 * 商品描述
	 */
	private String spuDescription;
	/**
	 * 所属分类id
	 */
	private Long catalogId;
	/**
	 * 品牌id
	 */
	private Long brandId;
	/**
	 * 品牌名
	 */
	@TableField(exist = false)
	private String brandName;
	/**
	 *
	 */
	private BigDecimal weight;
	/**
	 * 上架状态[0 - 下架，1 - 上架]
	 */
	@ListValue(vals = {0,1},message = "上架状态必须是0或者1")
	private Integer publishStatus;

}
